package com.ruoyi.exam.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.exam.mapper.ExamMakeupCourseMapper;
import com.ruoyi.exam.domain.ExamMakeupCourse;
import com.ruoyi.exam.service.IExamMakeupCourseService;

/**
 * 补缓考课程管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-11
 */
@Service
public class ExamMakeupCourseServiceImpl implements IExamMakeupCourseService 
{
    @Autowired
    private ExamMakeupCourseMapper examMakeupCourseMapper;

    /**
     * 查询补缓考课程管理
     * 
     * @param makeupId 补缓考课程管理主键
     * @return 补缓考课程管理
     */
    @Override
    public ExamMakeupCourse selectExamMakeupCourseByMakeupId(Long makeupId)
    {
        return examMakeupCourseMapper.selectExamMakeupCourseByMakeupId(makeupId);
    }

    /**
     * 查询补缓考课程管理列表
     * 
     * @param examMakeupCourse 补缓考课程管理
     * @return 补缓考课程管理
     */
    @Override
    public List<ExamMakeupCourse> selectExamMakeupCourseList(ExamMakeupCourse examMakeupCourse)
    {
        return examMakeupCourseMapper.selectExamMakeupCourseList(examMakeupCourse);
    }

    /**
     * 新增补缓考课程管理
     * 
     * @param examMakeupCourse 补缓考课程管理
     * @return 结果
     */
    @Override
    public int insertExamMakeupCourse(ExamMakeupCourse examMakeupCourse)
    {
        examMakeupCourse.setCreateTime(DateUtils.getNowDate());
        return examMakeupCourseMapper.insertExamMakeupCourse(examMakeupCourse);
    }

    /**
     * 修改补缓考课程管理
     * 
     * @param examMakeupCourse 补缓考课程管理
     * @return 结果
     */
    @Override
    public int updateExamMakeupCourse(ExamMakeupCourse examMakeupCourse)
    {
        examMakeupCourse.setUpdateTime(DateUtils.getNowDate());
        return examMakeupCourseMapper.updateExamMakeupCourse(examMakeupCourse);
    }

    /**
     * 批量删除补缓考课程管理
     * 
     * @param makeupIds 需要删除的补缓考课程管理主键
     * @return 结果
     */
    @Override
    public int deleteExamMakeupCourseByMakeupIds(Long[] makeupIds)
    {
        return examMakeupCourseMapper.deleteExamMakeupCourseByMakeupIds(makeupIds);
    }

    /**
     * 删除补缓考课程管理信息
     * 
     * @param makeupId 补缓考课程管理主键
     * @return 结果
     */
    @Override
    public int deleteExamMakeupCourseByMakeupId(Long makeupId)
    {
        return examMakeupCourseMapper.deleteExamMakeupCourseByMakeupId(makeupId);
    }
}
